<layout name="page" />
<block name="content">
	<style>
		li.thead .flex-inline {
			padding: 0px;
		}
		.ul-table li .flex-inline {
			padding-left: 0px;
			padding-right: 0px;
			border-left: 1px solid #ccc;
			border-right: 0px solid #ccc;
			flex-wrap: nowrap;
		}
		.progress {
			position: relative;
			background-color: #e2e2e2;
			border-radius: 2px;
			box-sizing: border-box;
			display: block;
			height: 20px;
			line-height: 18.5714px;
			margin-bottom: 0px;
			margin-top: 0px;
			overflow-x: hidden;
			overflow-y: hidden;
			text-align: center;
			border: 0px solid #ccc;
		}
		.progress .label {
			position: absolute;
			width: 100%;
			line-height: 20px;
			background-color: transparent;
		}
		.progress-bar {
			position: absolute;
			background-color: #2794EB;
			box-shadow: none;
			box-sizing: border-box;
			color: rgb(255, 255, 255);
			display: block;
			font-size: 12px;
			height: 20px;
			line-height: 20px;
			list-style-image: none;
			list-style-position: outside;
			list-style-type: none;
			margin-bottom: 0px;
			text-align: center;
			transition-delay: 0s;
			transition-duration: 0.6s;
			transition-property: width;
			transition-timing-function: ease;
		}

	</style>
	{:widget('page_header/simple',array('name'=>'项目看板'))}
	<form id="form_data"  method="post">
		<input name='type' type="hidden" value="{$type}">
		<div class="operate-panel">
			<a href="{:url('project_board',array('type'=>'all'))}" class="btn btn-link <eq name='type' value='all'>active</eq>"> 全部</a>
			<a href="{:url('project_board',array('type'=>'creater'))}" class="btn btn-link <eq name='type' value='creater'>active</eq>">我发起的</a>
			<a href="{:url('project_board',array('type'=>'actor'))}" class="btn btn-link <eq name='type' value='actor'>active</eq>">我参与的</a>
			<i class="x1"></i>
			<div class="input-box w21">
				<input type="text" class="input-date input text-center w11" value="{:substr($data['start_time'],0,10)}" name="start_time" readonly="readonly"/>
				<i class="date-mid">-</i>
				<input type="text" class="input-date input text-center" value="{:substr($data['end_time'],0,10)}" name="end_time" readonly="readonly"/>
			</div>
			<a class="btn btn-normal" onclick="query();">查询</a>
		</div>
	</form>
	<div class="sub">
		<div class="table">
			<ul>
				<li class="thead">
					<span class="w20" style="border-right:1px solid #ccc;">项目名称 </span>
					<span class="w20 x1 flex-inline" style="padding-left: 0px;padding-right:0px;display: inline-flex;">
						<foreach name="month" val="vo">
							<php>
								$width=round($vo/count($date)*100,4);
							</php>
							<div title="{$key}" style="width:{$width}%;border-right:1px solid #ccc;text-align:center;line-height:38px;  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">
								{$key}
							</div>
						</foreach></span>
					</span>
					<span class="w20">项目成员 </span>
				</li>
				<foreach name="list" val='vo'>
					<li class="tbody">
						<span class="w20" style="border-right:1px solid #ccc;"><a href="{:url('read',array('id'=>$vo['id']))}" title="{$vo.name}">{$vo.name}</a></span>
						<span class="w20 x1 flex-inline" style="display: inline-flex;padding-top:9px;padding-left: 0px;padding-right:0px;border-right:1px solid #ccc;"> {:gantt_chart($date,$vo)}</span>
						<span class="w20 ">{:show_contact($vo['member'])}</span>
					</li>
				</foreach>
			</ul>
		</div>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			set_return_url();
			var fn = {
				query : function() {
					$('#form_data').submit();
				}
			};
			win_exp(fn);
		});
	</script>
</block>